<template>
  <echarts-view :options="option" height="50px" theme="walden"></echarts-view>
</template>

<script>
import echartsView from '@/components/ECharts'
const year = []
const barData = []
for (let i = 0; i < 12; i += 1) {
  year.push(`20${(i + 1) < 10 ? '0' + (i + 1) : (i + 1)}年`)
  barData.push(Math.floor(Math.random() * 10000) + 200)
}
export default {
  components: {
    echartsView
  },
  data () {
    return {
      option: {
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        xAxis: {
          data: year,
          splitLine: {
            show: false
          }
        },
        yAxis: {
          type: 'value',
          show: false,
          splitLine: {
            show: false
          }
        },
        series: [
          {
            data: barData,
            type: 'bar'
          }
        ]
      }
    }
  }
}
</script>
